-- GENERATED SPELL FOR [Dragonflayer Soulreaver] --


function spell0_24249(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(43512,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24249', 3000, 1)
end

function spell1_24249(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24249', 18000, 1)
end

function Sorts_24249(pUnit, Event)
local choix_sorts_24249 = math.random(0, 1)
if choix_sorts_24249 == 0 then
pUnit:RegisterEvent('spell0_24249', 1, 1)
end
if choix_sorts_24249 == 1 then
pUnit:RegisterEvent('spell1_24249', 1, 1)
end
end

function mob24249_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24249', math.random(1500, 3000), 1)
end

function mob24249_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24249_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24249_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24249, 1, 'mob24249_Action')
RegisterUnitEvent(24249, 2, 'mob24249_Leave')
RegisterUnitEvent(24249, 3, 'mob24249_Kill')
RegisterUnitEvent(24249, 4, 'mob24249_Die')
